package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * GreetingListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class GreetingListId implements java.io.Serializable {

	// Fields

	private String greeting;
	private String result;

	// Constructors

	/** default constructor */
	public GreetingListId() {
	}

	/** full constructor */
	public GreetingListId(String greeting, String result) {
		this.greeting = greeting;
		this.result = result;
	}

	// Property accessors

	@Column(name = "greeting", length = 16777215)
	public String getGreeting() {
		return this.greeting;
	}

	public void setGreeting(String greeting) {
		this.greeting = greeting;
	}

	@Column(name = "result", length = 16777215)
	public String getResult() {
		return this.result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof GreetingListId))
			return false;
		GreetingListId castOther = (GreetingListId) other;

		return ((this.getGreeting() == castOther.getGreeting()) || (this
				.getGreeting() != null && castOther.getGreeting() != null && this
				.getGreeting().equals(castOther.getGreeting())))
				&& ((this.getResult() == castOther.getResult()) || (this
						.getResult() != null && castOther.getResult() != null && this
						.getResult().equals(castOther.getResult())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getGreeting() == null ? 0 : this.getGreeting().hashCode());
		result = 37 * result
				+ (getResult() == null ? 0 : this.getResult().hashCode());
		return result;
	}

}